<!-- 当前页面为文档模块入口，当列表打开’查看文档‘时，所有内容在此 -->
<template>
  <div>
    <el-tabs v-model="activeName">
      <el-tab-pane v-for="(item, index) in tabsList" :key="index" :label="item.label" :name="item.value">
      </el-tab-pane>
      <component v-if="!loading" class="pd10" :is="whickComm[activeName]" @refresh="handleRefresh"
        :nowRowData="props.nowRowData"></component>
    </el-tabs>
  </div>
</template>

<script setup lang="ts">
import { ref } from 'vue'
import FeeRequestForm from './FeeRequestForm/index.vue'
import RosterOfTheElderly from './RosterOfTheElderly/index.vue'
import OtherInfo from './OtherInfo/index.vue'
type Props = {
  nowRowData?: any
}
const props = withDefaults(defineProps<Props>(), {
  nowRowData: {}
})
const whickComm = {
  FeeRequestForm,
  RosterOfTheElderly,
  OtherInfo
}

const emit = defineEmits(['refresh'])
const loading = ref(false)
const tabsList: any = [
  { label: '五类老人”入住养老机构减免、冲抵费用申请表', value: 'FeeRequestForm' },
  { label: '老人花名册', value: 'RosterOfTheElderly' },
  { label: '其他信息', value: 'OtherInfo' },
]

const activeName = ref('FeeRequestForm')
const handleRefresh = () => {
  emit('refresh')
}

</script>

<style scoped></style>
